﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Text;
using SportTracksPluginFramework;
using ZoneFiveSoftware.Common.Visuals;

namespace DistributionPlugin.View
{
    class DistributionSettingsPage : STFrameworkSettingsPage
    {
        public DistributionSettingsPage()
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs("SettingsPage"));
            }
        }

#region STFrameworkSettingsPage members

        public override bool HidePage()
        {
            return true;
        }

        public override Guid Id
        {
            get { return GUIDs.SettingsPage; }
        }

        public override Guid MainPluginId
        {
            get { return GUIDs.PluginMain; }
        }

        public override string PageName
        {
            get { return PluginView.GetLocalizedString("SettingsPageNameText"); }
        }

        public override event PropertyChangedEventHandler PropertyChanged;

        public override System.Windows.Forms.Control SettingsPageControl
        {
            get
            {
                if (m_SettingsControl == null)
                {
                    m_SettingsControl = new DistributionSettingsControl();
                }

                return m_SettingsControl;
            }
        }

        public override void ShowPage(string bookmark)
        {
        }

        public override IPageStatus Status
        {
            get { return null; }
        }

        public override IList<ISettingsPage> SubPages
        {
            get { return null; }
        }

        public override void ThemeChanged(ITheme visualTheme)
        {
            if (m_SettingsControl != null)
            {
                m_SettingsControl.ThemeChanged(visualTheme);
            }
        }

        public override string Title
        {
            get { return PluginView.GetLocalizedString("SettingsPageNameText"); }
        }

        public override void UICultureChanged(CultureInfo culture)
        {
            if (m_SettingsControl != null)
            {
                m_SettingsControl.UICultureChanged(culture);
            }
        }

#endregion

        private DistributionSettingsControl m_SettingsControl;
    }
}
